<%--
  Created by IntelliJ IDEA.
  User: 34105
  Date: 2024/9/13
  Time: 18:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.example.model.User" %>
<!DOCTYPE html>
<html>
<head>
  <title>Edit User</title>
</head>
<body>
<h2>Edit User</h2>
<%
  User user = (User) request.getAttribute("user");
%>
<form action="UserController" method="post">
  <input type="hidden" name="action" value="edit"/>
  <input type="hidden" name="id" value="<%= user.getId() %>"/>
  Name: <input type="text" name="name" value="<%= user.getName() %>"/><br/>
  Email: <input type="text" name="email" value="<%= user.getEmail() %>"/><br/>
  <input type="submit" value="Update"/>
</form>
</body>
</html>